* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #2c3e50;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%), 
              url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.container {
  width: 420px;
  padding: 20px;
  min-height: 500px;
}

.header {
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #3498db, #9b59b6);
  border-radius: 1px;
}

.header h1 {
  font-size: 24px;
  color: #495057;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.connection-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

.connection-form h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #2c3e50;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(52, 152, 219, 0.1);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15), 0 4px 12px rgba(52, 152, 219, 0.1);
  transform: translateY(-1px);
}

/* 美化按钮样式 */
.btn, button {
  padding: 12px 16px;
  color: #2c3e50;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn svg, button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  margin-right: 6px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  transition: all 0.3s ease;
}

.btn svg:only-child, button svg:only-child {
  margin-right: 0;
}

.btn:hover, button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  border-color: #3498db;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
  color: #3498db;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  transition: all 0.3s ease;
}

.connect-btn {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.connect-btn:hover {
  background: linear-gradient(135deg, #495057, #343a40);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
  color: white;
}

/* 悬停提示 */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 5px;
  background-color: #2c3e50;
  color: white;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
}

[data-tooltip]:hover:before {
  opacity: 1;
  visibility: visible;
}

.auto-save-note {
  display: inline-block;
  margin-left: 8px;
  color: #7f8c8d;
  font-style: italic;
  font-size: 12px;
}

.connection-status {
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
}

.connection-status.connecting {
  background-color: #f5f5dc;
  color: #8a6d3b;
}

.connection-status.success {
  background-color: #dff0d8;
  color: #3c763d;
}

.connection-status.error {
  background-color: #f2dede;
  color: #a94442;
}

.hidden {
  display: none;
}

/* 文件浏览器布局 */
.file-explorer {
  position: relative;
}

/* 退出按钮容器 - 右上角 */
.logout-container {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 100;
  padding: 4px;
}

.logout-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.logout-btn i {
  width: 16px;
  height: 16px;
}

/* 路径输入容器 - 最上面 */
.path-input-container {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,249,250,0.95));
  backdrop-filter: blur(20px);
  padding: 20px 20px 16px 20px;
  padding-right: 90px; /* 为右上角的退出按钮留出空间 */
  border-radius: 16px 16px 0 0;
  margin-bottom: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

#current-path {
  width: 100%;
  font-weight: 500;
  color: #2c3e50;
  border: 2px solid rgba(52, 152, 219, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#current-path:focus {
  outline: none;
  border-color: #3498db;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15), 0 4px 12px rgba(52, 152, 219, 0.1);
  transform: translateY(-1px);
}

#current-path:hover {
  border-color: rgba(52, 152, 219, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

/* 导航容器 - 路径下方 */
.navigation-container {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,249,250,0.95));
  backdrop-filter: blur(20px);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.6);
  border-top: none;
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

/* 按钮组样式 */
.nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.path-group {
  flex: 1;
}

.view-group {
  margin: 0 16px;
}

.action-group {
  margin-left: auto;
}

/* 移除旧的path-navigation样式 */
.path-navigation {
  display: none;
}

/* 视图切换控件 */
.view-controls {
  display: flex;
  margin-left: auto;
  align-items: center;
}

.view-controls button {
  opacity: 0.5;
  margin-left: 4px;
}

.view-controls button.active {
  opacity: 1;
}

/* 退出按钮特殊样式 */
#logout-btn {
  margin-left: 10px;
  opacity: 0.7;
  color: #e74c3c;
}

#logout-btn:hover {
  opacity: 1;
}

/* 文件列表容器样式调整 */
.file-list {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-y: auto;
  flex: 1;
  max-height: 380px; /* 调整最大高度以适应新布局 */
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,249,250,0.95));
  backdrop-filter: blur(20px);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.6);
  border-top: none;
}

.file-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(225, 228, 232, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  margin: 2px 8px;
}

.file-item:hover {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.05));
  transform: translateX(4px);
  border-left: 3px solid #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.file-item:hover .file-icon {
  background: rgba(52, 152, 219, 0.2);
  transform: scale(1.1);
}

.file-item:hover .file-icon svg {
  transform: scale(1.1);
}

.file-main-info {
  display: flex;
  align-items: center;
  width: 100%;
}

.file-details {
  display: flex;
  margin-top: 4px;
  margin-left: 28px; /* 与图标对齐 */
  font-size: 12px;
  color: #6a737d;
}

.file-size-info {
  flex: 1;
}

.file-modified-info {
  flex: 1;
  text-align: right;
}

.file-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  height: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(52, 152, 219, 0.1);
  transition: all 0.3s ease;
}

.file-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  visibility: hidden;
}

.file-item:hover .file-actions {
  visibility: visible;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* 网格视图 */
.file-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 10px;
}

.file-list.grid-view .file-item {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
  border: 1px solid #e1e4e8;
  border-radius: 5px;
  height: 130px;
}

.file-list.grid-view .file-main-info {
  flex-direction: column;
  align-items: center;
}

.file-list.grid-view .file-icon {
  font-size: 36px;
  margin-right: 0;
  margin-bottom: 8px;
  width: auto;
}

.file-list.grid-view .file-icon svg {
  width: 36px;
  height: 36px;
}

.file-list.grid-view .file-name {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-list.grid-view .file-actions {
  margin-top: 5px;
  justify-content: center;
}

.file-list.grid-view .file-details {
  display: none; /* 在网格视图中隐藏详细信息区域 */
}

.file-list.grid-view .file-info {
  font-size: 11px;
  color: #6a737d;
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 列表视图 */
.file-list.list-view .file-item {
  flex-direction: column;
}

.file-list.list-view .file-info {
  display: none; /* 在列表视图中隐藏网格视图的信息 */
}

.upload-section {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  margin-top: 16px;
}

.file-input-wrapper {
  position: relative;
  flex-grow: 1;
  margin-right: 8px;
  overflow: hidden;
}

.file-input-wrapper .file-input-label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #2c3e50;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.file-input-wrapper .file-input-label:hover {
  background: rgba(52, 152, 219, 0.15);
  border-color: #3498db;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.file-input-wrapper .file-input-label span {
  margin-left: 5px;
}

#file-upload {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 0.1px;
  height: 0.1px;
}

/* 文件预览样式 */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-overlay.show {
  opacity: 1;
  visibility: visible;
}

.preview-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.preview-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.preview-pdf {
  width: 100%;
  height: 80vh;
  border: none;
}

.preview-close {
  position: absolute;
  top: -30px;
  right: 0;
  color: white;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.preview-title {
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  color: white;
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toast通知样式 */
.toast-container {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 250px;
  max-width: 90%;
  pointer-events: none;
}

.toast {
  background: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(20px);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  word-wrap: break-word;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.success {
  background-color: rgba(46, 204, 113, 0.9);
}

.toast.error {
  background-color: rgba(231, 76, 60, 0.9);
}

.toast.warning {
  background-color: rgba(241, 196, 15, 0.9);
}

.toast.info {
  background-color: rgba(52, 152, 219, 0.9);
}

/* 添加文件大小和日期的样式 */
.file-info {
  display: flex;
  color: #7f8c8d;
  font-size: 12px;
  margin-top: 2px;
}

.file-size {
  margin-right: 10px;
}

.file-date {
  margin-left: auto;
}

/* 网格视图下的大小展示 */
.file-list.grid-view .file-info {
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
}

.file-list.grid-view .file-size {
  margin-right: 0;
  white-space: nowrap;
}

.auto-connect-group {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.auto-connect-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

.auto-connect-group label {
  display: inline;
  font-size: 13px;
  color: #34495e;
  cursor: pointer;
}

/* 统一"选择文件"纸夹图标大小，与其它按钮icon一致 */
.file-input-label svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  transition: all 0.3s ease;
}

.file-input-wrapper .file-input-label:hover svg {
  transform: scale(1.1);
}

/* 纸夹与文字的间距与对齐优化 */
.file-input-label span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 新建文件夹按钮样式调整 */
.new-folder-button {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e1e4e8;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-bottom: 0;
  border-radius: 0;
}

.new-folder-button.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.new-folder-button:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.new-folder-btn {
  background: #3498db;
  color: white;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.new-folder-btn:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

.new-folder-text {
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
}

/* 工具栏按钮样式 */
.toolbar-new-folder-btn {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
  border: none;
}

.toolbar-new-folder-btn:hover {
  background: linear-gradient(135deg, #229954, #27ae60);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
  color: white;
}

.toolbar-upload-btn {
  background: linear-gradient(135deg, #3498db, #5dade2);
  color: white;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  border: none;
}

.toolbar-upload-btn:hover {
  background: linear-gradient(135deg, #2980b9, #3498db);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
  color: white;
}

/* 弹性新建文件夹按钮 */
.elastic-new-folder {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e1e8ed;
  padding: 12px 16px;
  margin: 0 -16px 16px -16px;
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.elastic-new-folder.show {
  transform: translateY(0);
  opacity: 1;
}

.elastic-new-folder-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.elastic-new-folder-btn:hover {
  background: linear-gradient(135deg, #229954, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.elastic-new-folder-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
}

.elastic-new-folder-btn i {
  width: 18px;
  height: 18px;
}

.elastic-new-folder-btn span {
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 16px;
    margin: 10px auto;
  }
  
  .header h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  
  .connection-form {
    padding: 20px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-group input {
    font-size: 16px; /* 防止iOS缩放 */
    padding: 14px 16px;
  }
  
  .connect-btn {
    padding: 14px 24px;
    font-size: 16px;
  }
  
  .file-list {
    padding: 12px;
  }
  
  .file-item {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .file-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }
  
  .btn-icon {
    padding: 10px;
    min-width: 44px; /* 触摸友好的最小尺寸 */
    min-height: 44px;
  }
  
  .upload-section {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }
  
  .file-input-wrapper .file-input-label {
    padding: 14px 16px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 12px;
    margin: 5px auto;
  }
  
  .header h1 {
    font-size: 20px;
  }
  
  .connection-form {
    padding: 16px;
  }
  
  .navigation-container {
    flex-direction: column;
    gap: 8px;
  }
  
  .action-group {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .btn {
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .file-item {
    padding: 10px;
  }
  
  .file-name {
    font-size: 14px;
  }
  
  .toast {
    margin: 0 10px;
    font-size: 12px;
  }
}

/* Language Toggle Styles */
.language-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.lang-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,249,250,0.8));
  backdrop-filter: blur(10px);
  border: 2px solid rgba(73,80,87,0.1);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.lang-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,1), rgba(248,249,250,0.95));
  border-color: #6c757d;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  color: #343a40;
}

.lang-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Marble texture enhancement */
.connection-form {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,249,250,0.95));
  backdrop-filter: blur(20px);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.6);
  position: relative;
}

.connection-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f8f9fa' fill-opacity='0.4'%3E%3Cpath d='M11 18c3.866 0 7-3.133 7-7s-3.134-7-7-7-7 3.133-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.133 7-7s-3.134-7-7-7-7 3.133-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'/%3E%3C/g%3E%3C/svg%3E") repeat;
  border-radius: 16px;
  pointer-events: none;
  z-index: -1;
}